<template>
  <i :class="cls" @click.stop="$emit('on-click')"></i>
</template>

<script>
export default {
  props: {
    type: {
	  type: String,
	  default: ''
	}
  },
  computed: {
    cls() {
	  switch(this.type) {
	    case 'success':
		  return 'weui-icon-success'
	    case 'loading':
		  return 'weui-loading'
		case 'cancel':
		  return 'weui-icon-cancel'
	  }
	}
  }
}
</script>

<style>
@import '~weui/dist/style/weui.min.css';
</style>
